<template>
  <div class="app-container" style="background: #FFFFFF;margin:10px;height: calc(100vh - 70px);">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="业务员" prop="deaId">
        <el-input
          v-model="queryParams.deaId"
       
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="所属渠道" prop="customer">
        <el-input
          v-model="queryParams.customer"
      
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="客户" prop="accountName">
        <el-input
          v-model="queryParams.accountName"
         
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
     
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row>
          <el-col :span="24">
            <el-card class="update-log">
              <div class="body">
                <h5 style="color: black; font-weight: bold;margin-top: 10px;margin-bottom: 0px;">统计信息</h5>
                <el-row>
                  <el-col :span="12">
                    <p style="font-size: 12px;color: #898e99;">
                      订单数量<a style="color: #23527c;margin-left: 50px;" href="javascript:;" class="支付宝信息">12个</a>
                    </p>
                  </el-col>
                  <el-col :span="12" >
                    <p style="font-size: 12px;color: #898e99;">
                      其它<a style="color: #23527c;margin-left: 50px;" href="javascript:;" class="支付宝信息">0个</a>
                    </p>
                  </el-col>
                </el-row>
       
              </div>
            </el-card>
          </el-col>
        </el-row>
        <el-row style="margin-top: 10px;">
          <el-col :span="24">
            <el-card class="update-log">
              <div class="body">
                <el-row>
                  <el-col :span="4">
                    <h5 style="color: black; font-weight: bold;margin-top: 10px;margin-bottom: 0px;">打款金额</h5>
                    <p style="font-size: 18px; font-weight: bold;">
                      110
                    </p>
                  </el-col>
                  <el-col :span="4">
                    <h5 style="color: black; font-weight: bold;margin-top: 10px;margin-bottom: 0px;">拨款金额</h5>
                    <p style="font-size: 18px; font-weight: bold;">
                      110
                    </p>
                  </el-col>
                  <el-col :span="4">
                    <h5 style="color: black; font-weight: bold;margin-top: 10px;margin-bottom: 0px;">反客金额</h5>
                    <p style="font-size: 18px; font-weight: bold;">
                      110
                    </p>
                  </el-col>
                  <el-col :span="4">
                    <h5 style="color: black; font-weight: bold;margin-top: 10px;margin-bottom: 0px;">反渠金额</h5>
                    <p style="font-size: 18px; font-weight: bold;">
                      110
                    </p>
                  </el-col>
                  <el-col :span="4">
                    <h5 style="color: black; font-weight: bold;margin-top: 10px;margin-bottom: 0px;">毛利润</h5>
                    <p style="font-size: 18px; font-weight: bold;">
                      110
                    </p>
                  </el-col>
                </el-row>
              </div>
            </el-card>
          </el-col>
        </el-row>
  </div>
</template>

<script>
import {listCustomerinfoa, listCustomerinfo, getCustomerinfo, delCustomerinfo, addCustomerinfo, updateCustomerinfo, tblistCustomerinfo, } from "@/api/CustomerinfoMain/customerinfo";
import { getUserProfile } from "@/api/system/user";
export default {
  name: "Customerinfo",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
   
      // 客户表格数据
      customerinfoList: [],
      // 下级客户表格数据
      customerinfoLista: [],
      // 弹出层标题
      title: "",
   
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        deaId: null,
        accountName: null,
        customer: null,
        associatedOn: null,
        associationType: null,
        label: null,
        telephone: null,
        verifiedStatus: null,
        countryCode: null,
        customerType: null,
        isFrozen: null,
        accountManagers: null,
        xaccountId: null,
        xaccountType: null,
        customerLevel: null,
        other1: null,
        other2: null,
        other3: null,
        other4: null,
        other5: null
      },
      usertype: "",
  
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {

    this.queryParams.deaId = this.$route.query.did;
 
    //执行查询搜索事件
    this.handleQuery();

    this.getList();
    this.getUser();

    
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    getUser() {
      getUserProfile().then(response => {
        this.user = response.data;
        this.usertype = this.user.usertype;
 
      });
    },
 
    // 表单重置
    reset() {
      this.form = {
        customerId: null,
        deaId: null,
        accountName: null,
        customer: null,
        associatedOn: null,
        associationType: null,
        label: null,
        telephone: null,
        verifiedStatus: null,
        countryCode: null,
        customerType: null,
        isFrozen: null,
        accountManagers: null,
        xaccountId: null,
        xaccountType: null,
        customerLevel: null,
        other1: null,
        other2: null,
        other3: null,
        other4: null,
        other5: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.customerId)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
   
  }
};
</script>
<style>
.dotClass {
  width:15px;
  height:15px;
  float: left;   margin-top: 3px;
  border-radius: 50%;
  display: block;

}
 
</style>